package com.onnext.androidsdk.util

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.onnext.androidsdk.ModuleActivity
import com.onnext.androidsdk.config.Names

import java.util.HashMap

object Go2Util {

    fun goModule(context: Context, params: HashMap<String, String>) {
        val intent = Intent(context, ModuleActivity::class.java)
        intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
        val extras = Bundle()
        params.forEach {
            extras.putString(it.key,it.value)
        }
        intent.putExtras(extras)
        context.startActivity(intent)
    }
}
